package IO;

import java.io.*;

public class Hczjl {
    public static void main(String[] args) throws IOException {
        BufferedInputStream bs=new BufferedInputStream(new FileInputStream("a.jpg"));
        BufferedOutputStream bo=new BufferedOutputStream(new FileOutputStream("d.jpg"));
        int len;
        while ((len = bs.read()) != -1) {
            bo.write(len);
        }
        bs.close();
        bo.close();
        /*
        BufferedInputStream bs=new BufferedInputStream(new FileInputStream("a.jpg"));
        BufferedOutputStream bo=new BufferedOutputStream(new FileOutputStream("e.jpg"));
        byte [] bys=new byte[1024];
        int len;
        while ((len = bs.read(bys)) != -1) {
            bo.write(bys,0,len);
        }
        bs.close();
        bo.close();
         */
    }
}
